<?php


namespace App\Notifications\Wechat;


class LevelEvaluate extends Notification
{
    public function notify($openId, $nickname, $wordCount)
    {
        $templateId = 'I6JDYVwwJDHaeLMAsj3cO3a3SjXBTXI9Fj2-zGP_2dg';
        $url = config('app.base_url') . '/?#/test/word';

        $data = [
            'first'    => sprintf("%s 家长您好，欢迎进入免费评测环节，评测完成后，我们精根据您的测试结果赠送一本匹配等级的绘本给您免费体验！\n", $nickname),
            'keyword1' => ['英语水平免费评测', '#FF6F6F'],
            'keyword2' => [$wordCount . "个\n", '#FF6F6F'],
            'remark'   => ['点击进入英语水平免费评测', '#FF6F6F'],
        ];
        $this->send($openId, $templateId, $url, $data);
    }
}
